<?php


 $sql = "  

 ";
 
 
 pdo_query($sql);
 
 

 if(!pdo_tableexists("ims_ymq_changdi_diancommand")) {
 pdo_query("
 
 

CREATE TABLE IF NOT EXISTS `ims_ymq_changdi_diancommand`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `fangjian_id` int(11) NOT NULL,
  `status` int(1) NOT NULL,
  `is_status` int(1) NOT NULL,
  `create_time` int(11) NOT NULL,
  `send_time` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;




CREATE TABLE `ims_ymq_changdi_category_income`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `category_id` int(11) NOT NULL DEFAULT 0 COMMENT '门店ID',
  `quan_amount` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '券收入金额',
  `wechat_recharge_amount` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '微信充值收入金额',
  `order_pay_amount` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '订单支付收入金额',
  `refund_amount` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '累计退款金额',
  `date_year_month` varchar(7) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '所属年月份，格式为 YYYY-MM',
  `uniacid` int(11) NOT NULL DEFAULT 0 COMMENT '应用id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '门店收入统计表' ROW_FORMAT = Compact;

CREATE TABLE `ims_ymq_changdi_category_quan`  (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '优惠券ID',
  `category_id` int(11) NOT NULL DEFAULT 0 COMMENT '所属门店ID',
  `user_id` int(11) NOT NULL DEFAULT 0 COMMENT '所属用户ID',
  `quan_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '优惠券名称',
  `quan_face_price` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '优惠券面值',
  `quan_balance` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '余额',
  `quan_price` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '美团团购价',
  `expire_time` datetime NULL DEFAULT NULL COMMENT '优惠券过期时间',
  `is_lock` tinyint(1) NOT NULL DEFAULT 0 COMMENT '优惠券锁定',
  `lock_time` datetime NULL DEFAULT NULL COMMENT '锁定时间',
  `is_used` tinyint(1) NOT NULL DEFAULT 0 COMMENT '优惠券是否已使用',
  `order_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '关联的验券订单ID',
  `meituan_quan_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '美团券代码',
  `create_time` datetime NULL DEFAULT NULL COMMENT '优惠券创建时间',
  `used_time` datetime NULL DEFAULT NULL COMMENT '优惠券被使用时间',
  `uniacid` int(11) NOT NULL DEFAULT 0 COMMENT '应用id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '门店优惠券表' ROW_FORMAT = Compact;

CREATE TABLE `ims_ymq_changdi_faq`  (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '问题ID',
  `category_id` int(11) NOT NULL COMMENT '所属门店ID',
  `question` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '问题描述',
  `answer` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '问题答案',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime NOT NULL COMMENT '修改时间',
  `uniacid` int(11) NOT NULL DEFAULT 0 COMMENT '应用id',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_category_id`(`category_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '常见问答表' ROW_FORMAT = Compact;

CREATE TABLE `ims_ymq_changdi_meituan_auth`  (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '美团授权ID',
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '授权备注名称',
  `app_key` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '美团应用Key',
  `app_secret` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '美团应用Secret',
  `bid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '美团客户ID',
  `token_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '令牌类型',
  `scope` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '令牌权限范围',
  `session` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'Session字符串',
  `session_expire_time` datetime NULL DEFAULT NULL COMMENT 'Session过期时间',
  `session_status` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Session是否有效:0=无效,1=有效',
  `session_check_time` datetime NULL DEFAULT NULL COMMENT 'Session检测时间',
  `refresh_session` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'Refresh Session字符串',
  `remain_refresh_count` int(11) NOT NULL DEFAULT 0 COMMENT '剩余刷新次数',
  `last_refresh_time` datetime NULL DEFAULT NULL COMMENT '最后刷新时间',
  `log_info` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '日志摘要信息',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `uniacid` int(11) NOT NULL DEFAULT 0 COMMENT '应用id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '美团授权表' ROW_FORMAT = Compact;

CREATE TABLE `ims_ymq_changdi_meituan_shop`  (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增门店ID',
  `meituan_auth_id` int(11) NULL DEFAULT 0 COMMENT '所属美团授权ID',
  `shop_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '店铺名称',
  `city_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '城市名称',
  `shop_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '店铺地址',
  `open_shop_uuid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '美团门店UUID',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `uniacid` int(11) NOT NULL DEFAULT 0 COMMENT '应用id',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_meituan_auth_id`(`meituan_auth_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '美团店铺表' ROW_FORMAT = Compact;

CREATE TABLE `ims_ymq_changdi_mini_image`  (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '轮播图',
  `weigh` int(11) NOT NULL COMMENT '图片权重',
  `main_image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '图片路径',
  `uni_page_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '链接页面地址',
  `show_switch` tinyint(2) NULL DEFAULT 0 COMMENT '1=开 0=关',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime NOT NULL COMMENT '修改时间',
  `uniacid` int(11) NOT NULL DEFAULT 0 COMMENT '应用id',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_category_id`(`weigh`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统轮播图表' ROW_FORMAT = Compact;

CREATE TABLE `ims_ymq_changdi_order_proc_help`  (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '流程ID',
  `weight` int(11) NOT NULL DEFAULT 0 COMMENT '流程权重，用于排序',
  `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '流程标题',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '流程内容',
  `image_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '流程图URL',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime NOT NULL COMMENT '修改时间',
  `category_id` int(11) NOT NULL COMMENT '所属门店ID',
  `uniacid` int(11) NOT NULL DEFAULT 0 COMMENT '应用id',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_category_id`(`category_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '下单流程表' ROW_FORMAT = Compact;

CREATE TABLE `ims_ymq_changdi_recharge_record`  (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '记录ID',
  `user_id` int(11) NOT NULL COMMENT '用户ID',
  `category_id` int(11) NOT NULL COMMENT '所属门店ID',
  `type` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '充值类型（alipay-支付宝，wechat-微信）',
  `order_no` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '系统自编订单号',
  `trade_no` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '第三方支付单号',
  `amount` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '充值金额',
  `is_success` tinyint(1) NOT NULL DEFAULT 0 COMMENT '充值是否成功（0-未成功，1-成功）',
  `create_time` datetime NOT NULL COMMENT '发起充值时间',
  `credit_time` datetime NULL DEFAULT NULL COMMENT '充值到账时间',
  `text_log` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '充值文本日志',
  `record_time` datetime NOT NULL COMMENT '记录创建时间',
  `uniacid` int(11) NOT NULL DEFAULT 0 COMMENT '应用id',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_user_id`(`user_id`) USING BTREE,
  INDEX `idx_category_id`(`category_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '充值记录表' ROW_FORMAT = Compact;

CREATE TABLE `ims_ymq_changdi_recharge_rule`  (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '规则ID',
  `category_id` int(11) NOT NULL COMMENT '所属门店ID',
  `amount` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '充值金额',
  `give_amount` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '赠送金额',
  `remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '充值说明',
  `uniacid` int(11) NOT NULL DEFAULT 0 COMMENT '应用id',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_category_id`(`category_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '充值优惠规则表' ROW_FORMAT = Compact;

CREATE TABLE `ims_ymq_changdi_user_category_quan_log`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '会员ID',
  `category_id` int(11) NOT NULL DEFAULT 0 COMMENT '门店ID',
  `quan_id` int(11) NOT NULL DEFAULT 0 COMMENT '优惠券ID',
  `money` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '变更余额',
  `before` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '变更前余额',
  `after` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '变更后余额',
  `memo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '备注',
  `createtime` bigint(20) NULL DEFAULT NULL COMMENT '创建时间',
  `uniacid` int(11) NOT NULL DEFAULT 0 COMMENT '应用id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '会员余额变动表' ROW_FORMAT = Compact;

CREATE TABLE `ims_ymq_changdi_user_category_rmb`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NULL DEFAULT 0 COMMENT '所属用户ID',
  `category_id` int(11) NULL DEFAULT 0 COMMENT '所属门店ID',
  `amount` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '用户在此门店余额',
  `uniacid` int(11) NOT NULL DEFAULT 0 COMMENT '应用id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '门店用户余额' ROW_FORMAT = Compact;

CREATE TABLE `ims_ymq_changdi_user_category_rmb_log`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '会员ID',
  `category_id` int(11) NOT NULL DEFAULT 0 COMMENT '门店ID',
  `money` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '变更余额',
  `before` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '变更前余额',
  `after` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '变更后余额',
  `memo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '备注',
  `createtime` bigint(20) NULL DEFAULT NULL COMMENT '创建时间',
  `uniacid` int(11) NOT NULL DEFAULT 0 COMMENT '应用id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '会员余额变动表' ROW_FORMAT = Compact;


INSERT INTO `ims_ymq_changdi_config` (`uniacid`, `name`, `group`, `title`, `tip`, `type`, `visible`, `value`, `content`, `rule`, `extend`, `setting`) VALUES (0, 'hall_lock_id', 'basic', '大厅锁ID', '', 'string', '', '7056139', NULL, '', '', NULL);

INSERT INTO `ims_ymq_changdi_config` (`uniacid`, `name`, `group`, `title`, `tip`, `type`, `visible`, `value`, `content`, `rule`, `extend`, `setting`) VALUES (0, 'lock_client_id', 'basic', '锁接口ClienId', '', 'string', '', '9ffbee2f97d24f4583d4210c78a406bb', NULL, '', '', NULL);

INSERT INTO `ims_ymq_changdi_config` (`uniacid`, `name`, `group`, `title`, `tip`, `type`, `visible`, `value`, `content`, `rule`, `extend`, `setting`) VALUES (0, 'lock_client_secret', 'basic', '锁接口ClienSecret', '', 'string', '', 'c034c00dce722e0cd6c96cf714d6f7d0', NULL, '', '', NULL);

INSERT INTO `ims_ymq_changdi_config` (`uniacid`, `name`, `group`, `title`, `tip`, `type`, `visible`, `value`, `content`, `rule`, `extend`, `setting`) VALUES (0, 'lock_username', 'basic', '锁账号', '', 'string', '', '17538146984', NULL, '', '', NULL);

INSERT INTO `ims_ymq_changdi_config` (`uniacid`, `name`, `group`, `title`, `tip`, `type`, `visible`, `value`, `content`, `rule`, `extend`, `setting`) VALUES (0, 'lock_password ', 'basic', '锁密码', '', 'string', '', 'qq131452020', NULL, '', '', NULL);

INSERT INTO `ims_ymq_changdi_config` (`uniacid`, `name`, `group`, `title`, `tip`, `type`, `visible`, `value`, `content`, `rule`, `extend`, `setting`) VALUES (0, 'tcp_ip', 'basic', 'TCP地址', '', 'string', '', 'chengnankeji.tpddns.cn', NULL, '', '', NULL);

INSERT INTO `ims_ymq_changdi_config` (`uniacid`, `name`, `group`, `title`, `tip`, `type`, `visible`, `value`, `content`, `rule`, `extend`, `setting`) VALUES (0, 'tcp_port', 'basic', 'TCP端口', '', 'string', '', '5581', NULL, '', '', NULL);



INSERT INTO `ims_ymq_changdi_config` (`uniacid`, `name`, `group`, `title`, `tip`, `type`, `visible`, `value`, `content`, `rule`, `extend`, `setting`) VALUES (0, 'message_name', 'basic', '喇叭账号', '', 'string', '', '17538146984', NULL, '', '', NULL);

INSERT INTO `ims_ymq_changdi_config` (`uniacid`, `name`, `group`, `title`, `tip`, `type`, `visible`, `value`, `content`, `rule`, `extend`, `setting`) VALUES (0, 'message_secret', 'basic', '喇叭Secret', '', 'string', '', 'ccf117fec236502918d1cb2356e1ba1a', NULL, '', '', NULL);

INSERT INTO `ims_ymq_changdi_config` (`uniacid`, `name`, `group`, `title`, `tip`, `type`, `visible`, `value`, `content`, `rule`, `extend`, `setting`) VALUES (0, 'end_time_min', 'basic', '订单结束提示分钟', '', 'string', '', '20', NULL, '', '', NULL);

INSERT INTO `ims_ymq_changdi_config` (`uniacid`, `name`, `group`, `title`, `tip`, `type`, `visible`, `value`, `content`, `rule`, `extend`, `setting`) VALUES (0, 'end_time_content', 'basic', '订单结束提醒内容', '', 'string', '', '尊敬的用户您好，您的娱乐时间还有二十分钟结束，为避免不必要的麻烦，请及时选择续单或者离场，离场前请带好您的随身物品', NULL, '', '', NULL);










UPDATE `ims_ymq_changdi_config` SET `name` = 'beian', `group` = 'basic', `title` = 'Beian', `tip` = '粤ICP备15000000号-1', `type` = 'string', `visible` = '1', `value` = '', `content` = '', `rule` = '', `extend` = '', `setting` = NULL WHERE `id` = 2;

UPDATE `ims_ymq_changdi_config` SET `name` = 'configgroup', `group` = 'dictionary', `title` = 'Config group', `tip` = '', `type` = 'array', `visible` = '', `value` = '{\"basic\":\"基础配置\"}', `content` = '', `rule` = '', `extend` = '', `setting` = NULL WHERE `id` = 10;

UPDATE `ims_ymq_changdi_config` SET `name` = 'taocan', `group` = 'basic', `title` = '续费时间配置', `tip` = '', `type` = 'array', `visible` = '', `value` = '{\"1\":\"一小时\",\"2\":\"二小时\",\"3\":\"三小时\",\"5\":\"五小时\",\"6\":\"六小时\",\"7\":\"七小时\"}', `content` = '{\"value1\":\"title1\",\"value2\":\"title2\"}', `rule` = '', `extend` = '', `setting` = '{\"table\":\"\",\"conditions\":\"\",\"key\":\"时间\",\"value\":\"名称\"}' WHERE `id` = 20;

UPDATE `ims_ymq_changdi_config` SET `name` = 'status', `group` = 'basic', `title` = '一键开门', `tip` = '', `type` = 'switch', `visible` = '', `value` = '1', `content` = '', `rule` = '', `extend` = '', `setting` = '{\"table\":\"\",\"conditions\":\"\",\"key\":\"\",\"value\":\"\"}' WHERE `id` = 22;

UPDATE `ims_ymq_changdi_config` SET `name` = 'appid', `group` = 'basic', `title` = 'appid', `tip` = '', `type` = 'string', `visible` = '', `value` = 'wxd9ae69f183ed1214', `content` = '', `rule` = '', `extend` = '', `setting` = '{\"table\":\"\",\"conditions\":\"\",\"key\":\"\",\"value\":\"\"}' WHERE `id` = 26;

UPDATE `ims_ymq_changdi_config` SET `name` = 'appsecret', `group` = 'basic', `title` = 'appsecret', `tip` = '', `type` = 'string', `visible` = '', `value` = '9830f4c61095877879c9d7d5126e03b7', `content` = '', `rule` = '', `extend` = '', `setting` = '{\"table\":\"\",\"conditions\":\"\",\"key\":\"\",\"value\":\"\"}' WHERE `id` = 27;

UPDATE `ims_ymq_changdi_config` SET `name` = 'template_id', `group` = 'basic', `title` = '下单成功订阅消息', `tip` = '', `type` = 'string', `visible` = '', `value` = 'PWBpUpnAYa1R9BXIUZ_ScMcbA5rhNXzqP3PHDgbOAVw', `content` = '', `rule` = '', `extend` = '', `setting` = '{\"table\":\"\",\"conditions\":\"\",\"key\":\"\",\"value\":\"\"}' WHERE `id` = 28;

UPDATE `ims_ymq_changdi_config` SET `name` = 'content', `group` = 'basic', `title` = '推送内容', `tip` = '', `type` = 'string', `visible` = '', `value` = '订单即将过期', `content` = '', `rule` = '', `extend` = '', `setting` = '{\"table\":\"\",\"conditions\":\"\",\"key\":\"\",\"value\":\"\"}' WHERE `id` = 29;








INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (186, 'file', 258, 'category_quan', '门店优惠券管理', 'fa fa-circle-o', '', '', '', 1, 'addtabs', '', 'mdyhqgl', 'mendianyouhuiquanguanli', 1679829333, 1680968095, 96, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (187, 'file', 186, 'category_quan/index', '查看', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'zk', 'zhakan', 1679829333, 1679829333, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (188, 'file', 186, 'category_quan/add', '添加', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'tj', 'tianjia', 1679829333, 1679829333, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (189, 'file', 186, 'category_quan/edit', '编辑', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'bj', 'bianji', 1679829333, 1679829333, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (190, 'file', 186, 'category_quan/del', '删除', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'sc', 'shanchu', 1679829333, 1679829333, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (191, 'file', 186, 'category_quan/multi', '批量更新', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'plgx', 'pilianggengxin', 1679829333, 1679829333, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (192, 'file', 66, 'user_category_rmb', '用户门店余额', 'fa fa-circle-o', '', '', '', 1, 'addtabs', '', 'yhmdye', 'yonghumendianyue', 1679830211, 1680967699, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (193, 'file', 192, 'user_category_rmb/index', '查看', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'zk', 'zhakan', 1679830211, 1679832947, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (194, 'file', 192, 'user_category_rmb/add', '添加', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'tj', 'tianjia', 1679830211, 1679832947, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (195, 'file', 192, 'user_category_rmb/edit', '编辑', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'bj', 'bianji', 1679830211, 1679832947, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (196, 'file', 192, 'user_category_rmb/del', '删除', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'sc', 'shanchu', 1679830211, 1679832947, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (197, 'file', 192, 'user_category_rmb/multi', '批量更新', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'plgx', 'pilianggengxin', 1679830211, 1679832947, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (198, 'file', 66, 'user_category_rmb_log', '会员余额变动管理', 'fa fa-circle-o', '', '', '', 1, 'addtabs', '', 'hyyebdgl', 'huiyuanyuebiandongguanli', 1679830214, 1680967642, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (199, 'file', 198, 'user_category_rmb_log/index', '查看', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'zk', 'zhakan', 1679830214, 1679830214, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (200, 'file', 198, 'user_category_rmb_log/add', '添加', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'tj', 'tianjia', 1679830214, 1679830214, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (201, 'file', 198, 'user_category_rmb_log/edit', '编辑', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'bj', 'bianji', 1679830214, 1679830214, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (202, 'file', 198, 'user_category_rmb_log/del', '删除', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'sc', 'shanchu', 1679830214, 1679830214, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (203, 'file', 198, 'user_category_rmb_log/multi', '批量更新', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'plgx', 'pilianggengxin', 1679830214, 1679830214, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (204, 'file', 66, 'recharge_rule', '充值优惠规则管理', 'fa fa-circle-o', '', '', '', 1, 'addtabs', '', 'czyhgzgl', 'chongzhiyouhuiguizeguanli', 1679832748, 1680967704, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (205, 'file', 204, 'recharge_rule/index', '查看', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'zk', 'zhakan', 1679832748, 1679832748, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (206, 'file', 204, 'recharge_rule/add', '添加', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'tj', 'tianjia', 1679832748, 1679832748, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (207, 'file', 204, 'recharge_rule/edit', '编辑', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'bj', 'bianji', 1679832748, 1679832748, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (208, 'file', 204, 'recharge_rule/del', '删除', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'sc', 'shanchu', 1679832748, 1679832748, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (209, 'file', 204, 'recharge_rule/multi', '批量更新', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'plgx', 'pilianggengxin', 1679832748, 1679832748, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (210, 'file', 66, 'recharge_record', '充值记录管理', 'fa fa-circle-o', '', '', '', 1, 'addtabs', '', 'czjlgl', 'chongzhijiluguanli', 1679832749, 1680967650, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (211, 'file', 210, 'recharge_record/index', '查看', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'zk', 'zhakan', 1679832749, 1679832749, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (212, 'file', 210, 'recharge_record/add', '添加', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'tj', 'tianjia', 1679832749, 1679832749, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (213, 'file', 210, 'recharge_record/edit', '编辑', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'bj', 'bianji', 1679832749, 1679832749, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (214, 'file', 210, 'recharge_record/del', '删除', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'sc', 'shanchu', 1679832749, 1679832749, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (215, 'file', 210, 'recharge_record/multi', '批量更新', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'plgx', 'pilianggengxin', 1679832749, 1679832749, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (216, 'file', 2, 'faq', '常见问答管理', 'fa fa-circle-o', '', '', '', 1, 'addtabs', '', 'cjwdgl', 'changjianwendaguanli', 1679832749, 1680967578, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (217, 'file', 216, 'faq/index', '查看', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'zk', 'zhakan', 1679832749, 1679832749, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (218, 'file', 216, 'faq/add', '添加', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'tj', 'tianjia', 1679832749, 1679832749, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (219, 'file', 216, 'faq/edit', '编辑', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'bj', 'bianji', 1679832749, 1679832749, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (220, 'file', 216, 'faq/del', '删除', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'sc', 'shanchu', 1679832749, 1679832749, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (221, 'file', 216, 'faq/multi', '批量更新', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'plgx', 'pilianggengxin', 1679832749, 1679832749, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (222, 'file', 2, 'order_proc_help', '下单流程管理', 'fa fa-circle-o', '', '', '', 1, 'addtabs', '', 'xdlcgl', 'xiadanliuchengguanli', 1679832749, 1680967568, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (223, 'file', 222, 'order_proc_help/index', '查看', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'zk', 'zhakan', 1679832749, 1679832749, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (224, 'file', 222, 'order_proc_help/add', '添加', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'tj', 'tianjia', 1679832749, 1679832749, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (225, 'file', 222, 'order_proc_help/edit', '编辑', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'bj', 'bianji', 1679832749, 1679832749, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (226, 'file', 222, 'order_proc_help/del', '删除', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'sc', 'shanchu', 1679832749, 1679832749, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (227, 'file', 222, 'order_proc_help/multi', '批量更新', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'plgx', 'pilianggengxin', 1679832749, 1679832749, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (228, 'file', 259, 'meituan_auth', '美团授权管理', 'fa fa-circle-o', '', '', '', 1, 'addtabs', '', 'mtsqgl', 'meituanshouquanguanli', 1679891601, 1680967503, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (229, 'file', 228, 'meituan_auth/index', '查看', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'zk', 'zhakan', 1679891601, 1679891601, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (230, 'file', 228, 'meituan_auth/add', '添加', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'tj', 'tianjia', 1679891601, 1679891601, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (231, 'file', 228, 'meituan_auth/edit', '编辑', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'bj', 'bianji', 1679891601, 1679891601, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (232, 'file', 228, 'meituan_auth/del', '删除', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'sc', 'shanchu', 1679891601, 1679891601, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (233, 'file', 228, 'meituan_auth/multi', '批量更新', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'plgx', 'pilianggengxin', 1679891601, 1679891601, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (234, 'file', 259, 'meituan_shop', '美团店铺管理', 'fa fa-circle-o', '', '', '', 1, 'addtabs', '', 'mtdpgl', 'meituandianpuguanli', 1679905747, 1680967512, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (235, 'file', 234, 'meituan_shop/index', '查看', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'zk', 'zhakan', 1679905747, 1679905747, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (236, 'file', 234, 'meituan_shop/add', '添加', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'tj', 'tianjia', 1679905747, 1679905747, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (237, 'file', 234, 'meituan_shop/edit', '编辑', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'bj', 'bianji', 1679905747, 1679905747, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (238, 'file', 234, 'meituan_shop/del', '删除', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'sc', 'shanchu', 1679905747, 1679905747, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (239, 'file', 234, 'meituan_shop/multi', '批量更新', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'plgx', 'pilianggengxin', 1679905747, 1679905747, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (240, 'file', 66, 'user_category_quan_log', '会员余额变动管理', 'fa fa-circle-o', '', '', '', 1, 'addtabs', '', 'hyyebdgl', 'huiyuanyuebiandongguanli', 1679967861, 1680967658, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (241, 'file', 240, 'user_category_quan_log/index', '查看', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'zk', 'zhakan', 1679967861, 1679967861, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (242, 'file', 240, 'user_category_quan_log/add', '添加', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'tj', 'tianjia', 1679967861, 1679967861, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (243, 'file', 240, 'user_category_quan_log/edit', '编辑', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'bj', 'bianji', 1679967861, 1679967861, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (244, 'file', 240, 'user_category_quan_log/del', '删除', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'sc', 'shanchu', 1679967861, 1679967861, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (245, 'file', 240, 'user_category_quan_log/multi', '批量更新', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'plgx', 'pilianggengxin', 1679967861, 1679967861, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (246, 'file', 2, 'mini_image', '系统轮播图管理', 'fa fa-circle-o', '', '', '', 1, 'addtabs', '', 'xtlbtgl', 'xitonglunbotuguanli', 1680168619, 1680967562, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (247, 'file', 246, 'mini_image/index', '查看', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'zk', 'zhakan', 1680168619, 1680168619, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (248, 'file', 246, 'mini_image/add', '添加', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'tj', 'tianjia', 1680168619, 1680168619, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (249, 'file', 246, 'mini_image/edit', '编辑', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'bj', 'bianji', 1680168619, 1680168619, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (250, 'file', 246, 'mini_image/del', '删除', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'sc', 'shanchu', 1680168619, 1680168619, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (251, 'file', 246, 'mini_image/multi', '批量更新', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'plgx', 'pilianggengxin', 1680168619, 1680168619, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (252, 'file', 258, 'category_income', '门店收入统计管理', 'fa fa-circle-o', '', '', '', 1, 'addtabs', '', 'mdsrtjgl', 'mendianshourutongjiguanli', 1680232687, 1680968065, 99, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (253, 'file', 252, 'category_income/index', '查看', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'zk', 'zhakan', 1680232688, 1680232688, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (254, 'file', 252, 'category_income/add', '添加', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'tj', 'tianjia', 1680232688, 1680232688, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (255, 'file', 252, 'category_income/edit', '编辑', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'bj', 'bianji', 1680232688, 1680232688, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (256, 'file', 252, 'category_income/del', '删除', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'sc', 'shanchu', 1680232688, 1680232688, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (257, 'file', 252, 'category_income/multi', '批量更新', 'fa fa-circle-o', '', '', '', 0, NULL, '', 'plgx', 'pilianggengxin', 1680232688, 1680232688, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (258, 'file', 0, 'mendianguanl', '门店中心', 'fa fa-circle-o', '', '', '', 1, 'addtabs', '', 'mdzx', 'mendianzhongxin', 1680967425, 1680967425, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (259, 'file', 0, 'sanfnagpngt', '三方平台', 'fa fa-circle-o', '', '', '', 1, 'addtabs', '', 'sfpt', 'sanfangpingtai', 1680967494, 1680967494, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES (261, 'file', 0, 'dindanzhongx', '订单中心', 'fa fa-circle-o', '', '', '', 1, 'addtabs', '', 'ddzx', 'dingdanzhongxin', 1680967809, 1680967809, 0, 'normal', 0);

UPDATE `ims_ymq_changdi_auth_rule` SET `type` = 'file', `pid` = 0, `name` = 'dashboard', `title` = 'Dashboard', `icon` = 'fa fa-dashboard', `url` = '', `condition` = '', `remark` = 'Dashboard tips', `ismenu` = 0, `menutype` = NULL, `extend` = '', `py` = 'kzt', `pinyin` = 'kongzhitai', `createtime` = 1491635035, `updatetime` = 1664458168, `weigh` = 143, `status` = 'normal', `uniacid` = 0 WHERE `id` = 1;

UPDATE `ims_ymq_changdi_auth_rule` SET `type` = 'file', `pid` = 0, `name` = 'general', `title` = '设置中心', `icon` = 'fa fa-cogs', `url` = '', `condition` = '', `remark` = '', `ismenu` = 1, `menutype` = 'addtabs', `extend` = '', `py` = 'szzx', `pinyin` = 'shezhizhongxin', `createtime` = 1491635035, `updatetime` = 1680967544, `weigh` = 137, `status` = 'normal', `uniacid` = 0 WHERE `id` = 2;

UPDATE `ims_ymq_changdi_auth_rule` SET `type` = 'file', `pid` = 258, `name` = 'category', `title` = '门店管理', `icon` = 'fa fa-leaf', `url` = '', `condition` = '', `remark` = '分类类型请在常规管理->系统配置->字典配置中添加', `ismenu` = 1, `menutype` = 'addtabs', `extend` = '', `py` = 'mdgl', `pinyin` = 'mendianguanli', `createtime` = 1491635035, `updatetime` = 1680968079, `weigh` = 98, `status` = 'normal', `uniacid` = 0 WHERE `id` = 3;

UPDATE `ims_ymq_changdi_auth_rule` SET `type` = 'file', `pid` = 0, `name` = 'addon', `title` = 'Addon', `icon` = 'fa fa-rocket', `url` = '', `condition` = '', `remark` = 'Addon tips', `ismenu` = 0, `menutype` = NULL, `extend` = '', `py` = 'cjgl', `pinyin` = 'chajianguanli', `createtime` = 1491635035, `updatetime` = 1681137790, `weigh` = 0, `status` = 'normal', `uniacid` = 0 WHERE `id` = 4;

UPDATE `ims_ymq_changdi_auth_rule` SET `type` = 'file', `pid` = 2, `name` = 'auth', `title` = '权限管理', `icon` = 'fa fa-group', `url` = '', `condition` = '', `remark` = '', `ismenu` = 1, `menutype` = 'addtabs', `extend` = '', `py` = 'qxgl', `pinyin` = 'quanxianguanli', `createtime` = 1491635035, `updatetime` = 1681137712, `weigh` = -2, `status` = 'normal', `uniacid` = 0 WHERE `id` = 5;

UPDATE `ims_ymq_changdi_auth_rule` SET `type` = 'file', `pid` = 2, `name` = 'general/config', `title` = 'Config', `icon` = 'fa fa-cog', `url` = '', `condition` = '', `remark` = 'Config tips', `ismenu` = 1, `menutype` = NULL, `extend` = '', `py` = 'xtpz', `pinyin` = 'xitongpeizhi', `createtime` = 1491635035, `updatetime` = 1491635035, `weigh` = 60, `status` = 'normal', `uniacid` = 0 WHERE `id` = 6;

UPDATE `ims_ymq_changdi_auth_rule` SET `type` = 'file', `pid` = 2, `name` = 'general/attachment', `title` = 'Attachment', `icon` = 'fa fa-file-image-o', `url` = '', `condition` = '', `remark` = 'Attachment tips', `ismenu` = 1, `menutype` = NULL, `extend` = '', `py` = 'fjgl', `pinyin` = 'fujianguanli', `createtime` = 1491635035, `updatetime` = 1491635035, `weigh` = 53, `status` = 'normal', `uniacid` = 0 WHERE `id` = 7;

UPDATE `ims_ymq_changdi_auth_rule` SET `type` = 'file', `pid` = 2, `name` = 'general/profile', `title` = 'Profile', `icon` = 'fa fa-user', `url` = '', `condition` = '', `remark` = '', `ismenu` = 0, `menutype` = NULL, `extend` = '', `py` = 'grzl', `pinyin` = 'gerenziliao', `createtime` = 1491635035, `updatetime` = 1680967882, `weigh` = 34, `status` = 'normal', `uniacid` = 0 WHERE `id` = 8;

UPDATE `ims_ymq_changdi_auth_rule` SET `type` = 'file', `pid` = 5, `name` = 'auth/rule', `title` = 'Rule', `icon` = 'fa fa-bars', `url` = '', `condition` = '', `remark` = 'Rule tips', `ismenu` = 0, `menutype` = NULL, `extend` = '', `py` = 'cdgz', `pinyin` = 'caidanguize', `createtime` = 1491635035, `updatetime` = 1681137607, `weigh` = 104, `status` = 'normal', `uniacid` = 0 WHERE `id` = 12;

UPDATE `ims_ymq_changdi_auth_rule` SET `type` = 'file', `pid` = 0, `name` = 'user', `title` = '会员管理', `icon` = 'fa fa-user-circle', `url` = '', `condition` = '', `remark` = '', `ismenu` = 1, `menutype` = 'addtabs', `extend` = '', `py` = 'hygl', `pinyin` = 'huiyuanguanli', `createtime` = 1491635035, `updatetime` = 1660721967, `weigh` = 50, `status` = 'normal', `uniacid` = 0 WHERE `id` = 66;

UPDATE `ims_ymq_changdi_auth_rule` SET `type` = 'file', `pid` = 66, `name` = 'user/user', `title` = 'User', `icon` = 'fa fa-user', `url` = '', `condition` = '', `remark` = '', `ismenu` = 1, `menutype` = NULL, `extend` = '', `py` = 'hygl', `pinyin` = 'huiyuanguanli', `createtime` = 1491635035, `updatetime` = 1491635035, `weigh` = 0, `status` = 'normal', `uniacid` = 0 WHERE `id` = 67;

UPDATE `ims_ymq_changdi_auth_rule` SET `type` = 'file', `pid` = 0, `name` = 'command', `title` = '在线命令管理', `icon` = 'fa fa-terminal', `url` = '', `condition` = '', `remark` = '', `ismenu` = 0, `menutype` = NULL, `extend` = '', `py` = 'zxmlgl', `pinyin` = 'zaixianminglingguanli', `createtime` = 1660703027, `updatetime` = 1680967830, `weigh` = 0, `status` = 'normal', `uniacid` = 0 WHERE `id` = 85;

UPDATE `ims_ymq_changdi_auth_rule` SET `type` = 'file', `pid` = 258, `name` = 'jiameng', `title` = '加盟入驻', `icon` = 'fa fa-circle-o', `url` = '', `condition` = '', `remark` = '', `ismenu` = 1, `menutype` = 'addtabs', `extend` = '', `py` = 'jmrz', `pinyin` = 'jiamengruzhu', `createtime` = 1660703098, `updatetime` = 1680967444, `weigh` = 10, `status` = 'normal', `uniacid` = 0 WHERE `id` = 92;

UPDATE `ims_ymq_changdi_auth_rule` SET `type` = 'file', `pid` = 258, `name` = 'fangjian', `title` = '房间管理', `icon` = 'fa fa-circle-o', `url` = '', `condition` = '', `remark` = '', `ismenu` = 1, `menutype` = 'addtabs', `extend` = '', `py` = 'fjgl', `pinyin` = 'fangjianguanli', `createtime` = 1660707789, `updatetime` = 1680968086, `weigh` = 97, `status` = 'normal', `uniacid` = 0 WHERE `id` = 153;

UPDATE `ims_ymq_changdi_auth_rule` SET `type` = 'file', `pid` = 261, `name` = 'order', `title` = '订单管理', `icon` = 'fa fa-circle-o', `url` = '', `condition` = '', `remark` = '', `ismenu` = 1, `menutype` = 'addtabs', `extend` = '', `py` = 'ddgl', `pinyin` = 'dingdanguanli', `createtime` = 1660713796, `updatetime` = 1680967818, `weigh` = 0, `status` = 'normal', `uniacid` = 0 WHERE `id` = 159;

UPDATE `ims_ymq_changdi_auth_rule` SET `type` = 'file', `pid` = 261, `name` = 'pinglun', `title` = '评论管理', `icon` = 'fa fa-circle-o', `url` = '', `condition` = '', `remark` = '', `ismenu` = 1, `menutype` = 'addtabs', `extend` = '', `py` = 'plgl', `pinyin` = 'pinglunguanli', `createtime` = 1661409330, `updatetime` = 1680967826, `weigh` = 0, `status` = 'normal', `uniacid` = 0 WHERE `id` = 168;

UPDATE `ims_ymq_changdi_auth_rule` SET `type` = 'file', `pid` = 258, `name` = 'renzheng', `title` = '认证管理', `icon` = 'fa fa-circle-o', `url` = '', `condition` = '', `remark` = '', `ismenu` = 1, `menutype` = 'addtabs', `extend` = '', `py` = 'rzgl', `pinyin` = 'renzhengguanli', `createtime` = 1661416885, `updatetime` = 1680967729, `weigh` = 0, `status` = 'normal', `uniacid` = 0 WHERE `id` = 174;

UPDATE `ims_ymq_changdi_auth_rule` SET `type` = 'file', `pid` = 2, `name` = 'gonggao', `title` = '公告管理', `icon` = 'fa fa-circle-o', `url` = '', `condition` = '', `remark` = '', `ismenu` = 1, `menutype` = 'addtabs', `extend` = '', `py` = 'gggl', `pinyin` = 'gonggaoguanli', `createtime` = 1661586568, `updatetime` = 1680967552, `weigh` = 0, `status` = 'normal', `uniacid` = 0 WHERE `id` = 180;

 
 ");
}



/*增加商家端和打扫端*/
 
  if(!pdo_tableexists("ims_ymq_changdi_card")) {
 pdo_query("
 

CREATE TABLE `ims_ymq_changdi_card`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `category_id` int(11) NOT NULL,
  `create_time` int(11) NOT NULL,
  `card_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `username` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `card_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
    `uniacid` int(11) NOT NULL DEFAULT 0 COMMENT '应用id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;



CREATE TABLE `ims_ymq_changdi_category_money_log`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `category_id` int(11) NOT NULL,
  `money` decimal(12, 2) NOT NULL DEFAULT 0.00,
  `before_money` decimal(12, 2) NOT NULL DEFAULT 0.00,
  `after_money` decimal(12, 2) NOT NULL DEFAULT 0.00,
  `memo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `create_time` int(11) NOT NULL,
  `money_type` int(11) NOT NULL DEFAULT 0,
  `uniacid` int(11) NOT NULL DEFAULT 0 COMMENT '应用id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;



CREATE TABLE `ims_ymq_changdi_look_time`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `fangjian_id` int(11) NOT NULL,
  `start_time` datetime NOT NULL,
  `end_time` decimal(12, 2) NOT NULL,
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `uniacid` int(11) NOT NULL DEFAULT 0 COMMENT '应用id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;



CREATE TABLE `ims_ymq_changdi_seller`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `password` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `create_time` int(11) NOT NULL,
  `state` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'normal' COMMENT '1 正常 0 异常',
  `token` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
  `nickname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
    `uniacid` int(11) NOT NULL DEFAULT 0 COMMENT '应用id',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `token`(`token`) USING BTREE,
  UNIQUE INDEX `username`(`username`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

CREATE TABLE `ims_ymq_changdi_staff`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `category_id` int(11) NOT NULL,
  `nickname` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `username` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `password` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `create_time` int(11) NOT NULL,
  `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `state` int(11) NOT NULL DEFAULT 0 COMMENT '0 未上线 1 上线',
    `uniacid` int(11) NOT NULL DEFAULT 0 COMMENT '应用id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

CREATE TABLE `ims_ymq_changdi_withdrawal`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `category_id` int(11) NOT NULL,
  `card_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `card_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `state` int(11) NOT NULL DEFAULT 0 COMMENT '0 未审核 1 通过 2 不通过',
  `create_time` int(11) NOT NULL,
  `examine_time` int(11) NOT NULL DEFAULT 0,
  `money` decimal(12, 2) NOT NULL,
  `after_money` decimal(12, 2) NOT NULL,
  `service_charge` decimal(12, 2) NOT NULL DEFAULT 0.00,
  `receipt_money` decimal(12, 2) NOT NULL DEFAULT 0.00,
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
    `uniacid` int(11) NOT NULL DEFAULT 0 COMMENT '应用id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;










INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`) VALUES (262, 'file', 258, 'seller', '商家账号', 'fa fa-user', '', '', '', 1, 'addtabs', '', 'sjzh', 'shangjiazhanghao', 1687337075, 1687337183, 0, 'normal');

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`) VALUES (263, 'file', 262, 'seller/index', '商家账号', 'fa fa-user', '', '', '', 0, 'addtabs', '', 'sjzh', 'shangjiazhanghao', 1687337146, 1687337243, 0, 'normal');

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`) VALUES (264, 'file', 262, 'seller/add', '新增', 'fa fa-circle-o', '', '', '', 0, 'addtabs', '', 'xz', 'xinzeng', 1687337352, 1687337352, 0, 'normal');

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`) VALUES (265, 'file', 262, 'seller/edit', '编辑', 'fa fa-circle-o', '', '', '', 0, 'addtabs', '', 'bj', 'bianji', 1687337363, 1687337363, 0, 'normal');

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`) VALUES (266, 'file', 262, 'seller/del', '删除', 'fa fa-circle-o', '', '', '', 0, 'addtabs', '', 'sc', 'shanchu', 1687337379, 1687337379, 0, 'normal');

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`) VALUES (267, 'file', 258, 'withdrawal', '提现申请', 'fa fa-circle-o', '', '', '', 1, 'addtabs', '', 'txsq', 'tixianshenqing', 1687764853, 1687764873, 0, 'normal');

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`) VALUES (268, 'file', 267, 'withdrawal/agree', '同意', 'fa fa-circle-o', '', '', '', 0, 'addtabs', '', 'ty', 'tongyi', 1687764910, 1687764910, 0, 'normal');

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`) VALUES (269, 'file', 267, 'withdrawal/refuse', '拒绝', 'fa fa-circle-o', '', '', '', 0, 'addtabs', '', 'jj', 'jujue', 1687764933, 1687764933, 0, 'normal');

INSERT INTO `ims_ymq_changdi_auth_rule` (`id`, `type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`) VALUES (270, 'file', 258, 'categorymoneylog', '商家余额', 'fa fa-circle-o', '', '', '', 1, 'addtabs', '', 'sjye', 'shangjiayue', 1687769129, 1687769129, 0, 'normal');






INSERT INTO `ims_ymq_changdi_config` (`uniacid`, `name`, `group`, `title`, `tip`, `type`, `visible`, `value`, `content`, `rule`, `extend`, `setting`) VALUES (0, 'withdrawal_commission', 'basic', '提现手续费（%）', '', 'string', '', '10', NULL, '', '', NULL);

INSERT INTO `ims_ymq_changdi_config` (`uniacid`, `name`, `group`, `title`, `tip`, `type`, `visible`, `value`, `content`, `rule`, `extend`, `setting`) VALUES (0, 'order_commission_type', 'basic', '订单提点类型', '', 'select', '', '0', '[\"百分比\",\"固定金额\"]', '', '', NULL);

INSERT INTO `ims_ymq_changdi_config` (`uniacid`, `name`, `group`, `title`, `tip`, `type`, `visible`, `value`, `content`, `rule`, `extend`, `setting`) VALUES (0, 'order_commission', 'basic', '订单提点', '', 'string', '', '2', NULL, '', '', NULL);

INSERT INTO `ims_ymq_changdi_config` (`uniacid`, `name`, `group`, `title`, `tip`, `type`, `visible`, `value`, `content`, `rule`, `extend`, `setting`) VALUES (0, 'is_bind_mobile', 'basic', '强制绑定手机号码', '', 'bool', '', '0', NULL, '', '', NULL);

INSERT INTO `ims_ymq_changdi_config` (`uniacid`, `name`, `group`, `title`, `tip`, `type`, `visible`, `value`, `content`, `rule`, `extend`, `setting`) VALUES (0, 'TencentCloudSecretId', 'basic', '腾讯云SecretId', '', 'string', '', 'AKIDypT5ZpshVCl5C7oIZdT6HNIzUmsnZ8Vf', NULL, '', '', NULL);

INSERT INTO `ims_ymq_changdi_config` (`uniacid`, `name`, `group`, `title`, `tip`, `type`, `visible`, `value`, `content`, `rule`, `extend`, `setting`) VALUES (0, 'TencentCloudSecretKey', 'basic', '腾讯云SecretKey', '', 'string', '', 'aBannZ9ZlkW6TdcO2VcZLxOekiXDj6IM', NULL, '', '', NULL);

INSERT INTO `ims_ymq_changdi_config` (`uniacid`, `name`, `group`, `title`, `tip`, `type`, `visible`, `value`, `content`, `rule`, `extend`, `setting`) VALUES (0, 'TencentCloudVmsAppid', 'basic', '电话通知appid', '', 'string', '', '1400820246', NULL, '', '', NULL);

INSERT INTO `ims_ymq_changdi_config` (`uniacid`, `name`, `group`, `title`, `tip`, `type`, `visible`, `value`, `content`, `rule`, `extend`, `setting`) VALUES (0, 'TencentCloudVmsTemplateId', 'basic', '电话通知模板id', '', 'string', '', '1478049', NULL, '', '', NULL);



 
 ");
}
 
 
 
 
 
 
 
 if(!pdo_fieldexists("ims_ymq_changdi_category", "business_end_time")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_category` ADD COLUMN `business_stare_time` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL AFTER `jiameng_id`;");
}
 
 
  if(!pdo_fieldexists("ims_ymq_changdi_category", "business_stare_time")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_category` ADD COLUMN `business_stare_time` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL AFTER `jiameng_id`;");
}

   if(!pdo_fieldexists("ims_ymq_changdi_fangjian", "booking_time")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_fangjian` ADD COLUMN `booking_time` int(11) NOT NULL DEFAULT 0 AFTER `opening_command`;");
}


   if(!pdo_fieldexists("ims_ymq_changdi_fangjian", "duration")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_fangjian` ADD COLUMN `duration` int(1) NOT NULL DEFAULT 0 AFTER `booking_time`;");
}

 
   if(!pdo_fieldexists("ims_ymq_changdi_fangjian", "message_devid")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_fangjian` ADD COLUMN `message_devid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL AFTER `duration`;");
}
 
 
   if(!pdo_fieldexists("ims_ymq_changdi_order", "is_message")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_order` ADD COLUMN `is_message` tinyint(3) NOT NULL DEFAULT 0 AFTER `is_write_off`;");
}
 
 
    if(!pdo_fieldexists("ims_ymq_changdi_fangjian", "hall_lock_id")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_fangjian` ADD COLUMN `hall_lock_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL AFTER `images`;");
}
 
    if(!pdo_fieldexists("ims_ymq_changdi_fangjian", "room_lock_id")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_fangjian` ADD COLUMN `room_lock_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL AFTER `hall_lock_id`;");
}
 
     if(!pdo_fieldexists("ims_ymq_changdi_fangjian", "closing_command")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_fangjian` ADD COLUMN `closing_command` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '合闸' AFTER `room_lock_id`;");
}

    if(!pdo_fieldexists("ims_ymq_changdi_fangjian", "opening_command")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_fangjian` ADD COLUMN `opening_command` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '分闸' AFTER `closing_command`;");
}


    if(!pdo_fieldexists("ims_ymq_changdi_auth_group_access", "uniacid")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_auth_group_access` ADD COLUMN `uniacid` int(11) NOT NULL DEFAULT 0 COMMENT '应用id' AFTER `group_id`;");
}
 

if(!pdo_fieldexists("ims_ymq_changdi_category", "hall_lock_id")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_category` ADD COLUMN `hall_lock_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '大厅锁ID' AFTER `business_end_time`;");
}


if(!pdo_fieldexists("ims_ymq_changdi_category", "lock_client_id")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_category` ADD COLUMN `lock_client_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '锁接口ClienId' AFTER `hall_lock_id`;");
}


if(!pdo_fieldexists("ims_ymq_changdi_category", "lock_client_secret")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_category` ADD COLUMN `lock_client_secret` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '锁接口ClienSecret' AFTER `lock_client_id`;");
}

if(!pdo_fieldexists("ims_ymq_changdi_category", "lock_username")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_category` ADD COLUMN `lock_username` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '锁账号' AFTER `lock_client_secret`;");
}


if(!pdo_fieldexists("ims_ymq_changdi_category", "lock_password")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_category` ADD COLUMN `lock_password` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '锁密码' AFTER `lock_username`;");
}


if(!pdo_fieldexists("ims_ymq_changdi_category", "message_name")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_category` ADD COLUMN `message_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '喇叭账号' AFTER `lock_password`;");
}



if(!pdo_fieldexists("ims_ymq_changdi_category", "message_secret")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_category` ADD COLUMN `message_secret` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '喇叭Secret' AFTER `message_name`;");
}


if(!pdo_fieldexists("ims_ymq_changdi_category", "end_time_min")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_category` ADD COLUMN `end_time_min` int(11) NULL DEFAULT 0 COMMENT '订单结束提示分钟' AFTER `message_secret`;");
}


if(!pdo_fieldexists("ims_ymq_changdi_category", "end_time_content")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_category` ADD COLUMN `end_time_content` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '订单结束提醒内容' AFTER `end_time_min`;

");
}


if(!pdo_fieldexists("ims_ymq_changdi_category", "wifi_ssid")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_category` ADD COLUMN `wifi_ssid` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT 'WIFI名称' AFTER `end_time_content`;

");
}


if(!pdo_fieldexists("ims_ymq_changdi_category", "wifi_password")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_category` ADD COLUMN `wifi_password` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT 'WIFI密码' AFTER `wifi_ssid`;

");
}


if(!pdo_fieldexists("ims_ymq_changdi_category", "cancel_order_min")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_category` ADD COLUMN `cancel_order_min` int(11) NULL DEFAULT 30 COMMENT '前N分钟可取消订单' AFTER `wifi_password`;

");
}


if(!pdo_fieldexists("ims_ymq_changdi_category", "meituan_auth_id")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_category` ADD COLUMN `meituan_auth_id` int(11) NULL DEFAULT 0 COMMENT '美团授权ID' AFTER `cancel_order_min`;

");
}

if(!pdo_fieldexists("ims_ymq_changdi_category", "meituan_open_id")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_category` ADD COLUMN `meituan_open_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '美团店铺ID' AFTER `meituan_auth_id`;

");
}

if(!pdo_fieldexists("ims_ymq_changdi_diancommand", "uniacid")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_diancommand` ADD COLUMN `uniacid` int(11) NOT NULL DEFAULT 0 COMMENT '应用id' AFTER `send_time`;

");
}


if(!pdo_fieldexists("ims_ymq_changdi_migrations", "uniacid")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_migrations` ADD COLUMN `uniacid` int(11) NOT NULL DEFAULT 0 COMMENT '应用id' AFTER `breakpoint`;

");
}

if(!pdo_fieldexists("ims_ymq_changdi_order", "quan_id")) {
	pdo_query("ALTER TABLE `ims_ymq_changdi_order` ADD COLUMN `quan_id` int(11) NULL DEFAULT 0 COMMENT '优惠券id' AFTER `is_message`;
ALTER TABLE `ims_ymq_changdi_order` ADD COLUMN `quan_price` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '优惠券支付' AFTER `quan_id`;
ALTER TABLE `ims_ymq_changdi_order` ADD COLUMN `real_price` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '实际支付' AFTER `quan_price`;
ALTER TABLE `ims_ymq_changdi_user_token` ADD COLUMN `uniacid` int(11) NOT NULL DEFAULT 0 COMMENT '应用id' AFTER `expiretime`;");
}


 if(!pdo_fieldexists("ims_ymq_changdi_order", "pay_type")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_order` ADD COLUMN `pay_type` int(11) NOT NULL DEFAULT 0 AFTER `real_price`;");
}


 if(!pdo_fieldexists("ims_ymq_changdi_order", "settlement_money")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_order` ADD COLUMN `settlement_money` decimal(12, 2) NOT NULL DEFAULT 0.00 AFTER `pay_type`;");
}


 if(!pdo_fieldexists("ims_ymq_changdi_order", "is_send_settlement_money")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_order` ADD COLUMN `is_send_settlement_money` int(11) NULL DEFAULT 0 COMMENT '0 未结算 1已结算' AFTER `settlement_money`;");
}


 if(!pdo_fieldexists("ims_ymq_changdi_order", "settlement_amount")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_order` ADD COLUMN `settlement_amount` decimal(12, 2) NOT NULL DEFAULT 0.00 AFTER `is_send_settlement_money`;");
}

if(!pdo_fieldexists("ims_ymq_changdi_category_money_log", "update_time")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_category_money_log` ADD COLUMN `update_time` int(11) NULL DEFAULT NULL AFTER `uniacid`;");
}


 if(!pdo_fieldexists("ims_ymq_changdi_order", "command_opening_num")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_order` ADD COLUMN `command_opening_num` int(11) NOT NULL DEFAULT 0 AFTER `settlement_amount`;");
}

 if(!pdo_fieldexists("ims_ymq_changdi_order", "command_closing_num")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_order` ADD COLUMN `command_closing_num` int(11) NOT NULL DEFAULT 0 AFTER `command_opening_num`;");
}

 if(!pdo_fieldexists("ims_ymq_changdi_order", "seller_id")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_category` ADD COLUMN `seller_id` int(11) NULL DEFAULT 0 AFTER `meituan_open_id`;");
}

 if(!pdo_fieldexists("ims_ymq_changdi_order", "balance")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_category` ADD COLUMN `balance` decimal(12, 2) NOT NULL DEFAULT 0.00 AFTER `seller_id`;");
}

 if(!pdo_fieldexists("ims_ymq_changdi_order", "send_num")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_diancommand` ADD COLUMN `send_num` int(11) NOT NULL DEFAULT 0 AFTER `send_time`;");
}

 if(!pdo_fieldexists("ims_ymq_changdi_fangjian", "balance")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_fangjian` ADD COLUMN `clean_time` int(11) NOT NULL DEFAULT 0 AFTER `message_devid`;");
}
 if(!pdo_fieldexists("ims_ymq_changdi_fangjian", "dian_id")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_fangjian` ADD COLUMN `dian_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL AFTER `clean_time`;");
}
 
 /*优化电控*/
 
  if(!pdo_fieldexists("ims_ymq_changdi_category", "port")) {
 pdo_query("ALTER TABLE `ims_ymq_changdi_category` ADD COLUMN `port` int(11) NULL DEFAULT NULL AFTER `balance`;");
}



/*0.12优化套餐、时间选择等*/

if(!pdo_fieldexists("ims_ymq_changdi_fangjian", "package_vip_price")) {
 pdo_query("
ALTER TABLE `ims_ymq_changdi_category_income` ROW_FORMAT = COMPACT;

ALTER TABLE `ims_ymq_changdi_category_quan` ROW_FORMAT = COMPACT;

ALTER TABLE `ims_ymq_changdi_fangjian` ADD COLUMN `package_vip_price` int(11) NOT NULL DEFAULT 0 AFTER `uniacid`;

CREATE TABLE `ims_ymq_changdi_fangjian_package`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `fj_id` int(11) NOT NULL,
  `times` int(11) NOT NULL,
  `price` decimal(12, 2) NOT NULL,
  `uniacid` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

ALTER TABLE `ims_ymq_changdi_faq` ROW_FORMAT = COMPACT;

ALTER TABLE `ims_ymq_changdi_meituan_auth` ROW_FORMAT = COMPACT;

ALTER TABLE `ims_ymq_changdi_meituan_shop` ROW_FORMAT = COMPACT;

ALTER TABLE `ims_ymq_changdi_mini_image` ROW_FORMAT = COMPACT;

ALTER TABLE `ims_ymq_changdi_order` ADD COLUMN `refund_money` decimal(12, 2) NOT NULL DEFAULT 0.00 AFTER `uniacid`;

ALTER TABLE `ims_ymq_changdi_order` ADD COLUMN `org_price` decimal(12, 2) NOT NULL DEFAULT 0.00 AFTER `refund_money`;

ALTER TABLE `ims_ymq_changdi_order` ADD COLUMN `is_package` int(1) NOT NULL DEFAULT 0 AFTER `org_price`;

ALTER TABLE `ims_ymq_changdi_order` ADD COLUMN `package_vip_price` int(1) NOT NULL DEFAULT 0 AFTER `is_package`;

ALTER TABLE `ims_ymq_changdi_order` MODIFY COLUMN `command_closing_num` int(11) NOT NULL DEFAULT 0 AFTER `package_vip_price`;

ALTER TABLE `ims_ymq_changdi_order` MODIFY COLUMN `command_opening_num` int(11) NOT NULL DEFAULT 0 AFTER `command_closing_num`;



ALTER TABLE `ims_ymq_changdi_order_proc_help` ROW_FORMAT = COMPACT;

ALTER TABLE `ims_ymq_changdi_recharge_record` ROW_FORMAT = COMPACT;

ALTER TABLE `ims_ymq_changdi_recharge_record` ADD COLUMN `rule_id` int(11) NOT NULL DEFAULT 0 AFTER `uniacid`;

ALTER TABLE `ims_ymq_changdi_recharge_rule` ROW_FORMAT = COMPACT;

ALTER TABLE `ims_ymq_changdi_recharge_rule` ADD COLUMN `level` int(3) NOT NULL DEFAULT 0 AFTER `uniacid`;

ALTER TABLE `ims_ymq_changdi_recharge_rule` ADD COLUMN `discount` decimal(12, 2) NOT NULL DEFAULT 10.00 AFTER `level`;

ALTER TABLE `ims_ymq_changdi_user_category_quan_log` ROW_FORMAT = COMPACT;

ALTER TABLE `ims_ymq_changdi_user_category_rmb` ROW_FORMAT = COMPACT;

ALTER TABLE `ims_ymq_changdi_user_category_rmb` ADD COLUMN `level` int(3) NOT NULL DEFAULT 0 AFTER `uniacid`;

ALTER TABLE `ims_ymq_changdi_user_category_rmb` ADD COLUMN `discount` decimal(12, 2) NOT NULL DEFAULT 10.00 AFTER `level`;

ALTER TABLE `ims_ymq_changdi_user_category_rmb_log` ROW_FORMAT = COMPACT;

 INSERT INTO `ims_ymq_changdi_config` (`uniacid`, `name`, `group`, `title`, `tip`, `type`, `visible`, `value`, `content`, `rule`, `extend`, `setting`) VALUES (0, 'predetermine_time', 'basic', '提前预约时间(小时)', '', 'string', '', '', '', '', '', '{\"table\":\"\",\"conditions\":\"\",\"key\":\"\",\"value\":\"\"}');
");
}




/*0.16新增喇叭测试，优化打扫设置*/

  if(!pdo_fieldexists("ims_ymq_changdi_fangjian", "is_dasao")) {
 pdo_query("
 ALTER TABLE `ims_ymq_changdi_fangjian` ADD COLUMN `is_dasao` int(2) NOT NULL DEFAULT 0 AFTER `package_vip_price`;
 
 ");
}


/*0.18更新抖音核销卷和全新UI*/


	 if(!pdo_tableexists("ims_ymq_changdi_douyin_auth")) {
 pdo_query("
 
 ALTER TABLE `ims_ymq_changdi_category` ADD COLUMN `douyin_shop_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '抖音门店' AFTER `uniacid`;

ALTER TABLE `ims_ymq_changdi_category_quan` ADD COLUMN `log` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '优惠券抖音返回结果' AFTER `uniacid`;

ALTER TABLE `ims_ymq_changdi_category_quan` ADD COLUMN `type` int(11) NOT NULL DEFAULT 1 COMMENT '1 美团，2抖音' AFTER `log`;

CREATE TABLE `ims_ymq_changdi_douyin_auth`  (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '抖音授权ID',
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '授权备注名称',
  `app_key` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '抖音应用Key',
  `app_secret` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '抖音应用Secret',
  `bid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '抖音客户ID',
  `token_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '令牌类型',
  `scope` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '令牌权限范围',
  `session` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'Session字符串',
  `session_expire_time` datetime NULL DEFAULT NULL COMMENT 'Session过期时间',
  `session_status` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Session是否有效:0=无效,1=有效',
  `session_check_time` datetime NULL DEFAULT NULL COMMENT 'Session检测时间',
  `refresh_session` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'Refresh Session字符串',
  `remain_refresh_count` int(11) NOT NULL DEFAULT 0 COMMENT '剩余刷新次数',
  `last_refresh_time` datetime NULL DEFAULT NULL COMMENT '最后刷新时间',
  `log_info` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '日志摘要信息',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `uniacid` int(11) NOT NULL DEFAULT 0 COMMENT '应用id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '抖音授权表' ROW_FORMAT = COMPACT;

CREATE TABLE `ims_ymq_changdi_douyin_shop`  (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增门店ID',
  `douyin_auth_id` int(11) NULL DEFAULT 0 COMMENT '所属抖音授权ID',
  `shop_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '店铺名称',
  `city_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '城市名称',
  `shop_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '店铺地址',
  `open_shop_uuid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '抖音门店UUID',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `uniacid` int(11) NOT NULL DEFAULT 0 COMMENT '应用id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '抖音店铺表' ROW_FORMAT = COMPACT;


INSERT INTO `ims_ymq_changdi_auth_rule` (`type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES ('file', 259, 'douyin_auth', '抖音授权管理', 'fa fa-circle-o', '', '', '', 1, 'addtabs', '', 'dysqgl', 'douyinshouquanguanli', 1699192668, 1699192704, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_auth_rule` (`type`, `pid`, `name`, `title`, `icon`, `url`, `condition`, `remark`, `ismenu`, `menutype`, `extend`, `py`, `pinyin`, `createtime`, `updatetime`, `weigh`, `status`, `uniacid`) VALUES ('file', 259, 'douyin_shop', '抖音商铺管理', 'fa fa-circle-o', '', '', '', 1, 'addtabs', '', 'dyspgl', 'douyinshangpuguanli', 1699192744, 1699192744, 0, 'normal', 0);

INSERT INTO `ims_ymq_changdi_config` (`name`, `group`, `title`, `tip`, `type`, `visible`, `value`, `content`, `rule`, `extend`, `setting`, `uniacid`) VALUES ('icon_img', 'basic', '图标', '', 'file', '', '收起', '', '', '', '{\"table\":\"\",\"conditions\":\"\",\"key\":\"\",\"value\":\"\"}', 0);


INSERT INTO `ims_ymq_changdi_config` (`name`, `group`, `title`, `tip`, `type`, `visible`, `value`, `content`, `rule`, `extend`, `setting`, `uniacid`) VALUES ('dasao_order', 'basic', '是否在打扫期间限制下单', '', 'switch', '', '1', '', '', '', '{\"table\":\"\",\"conditions\":\"\",\"key\":\"\",\"value\":\"\"}', 0);
 
 ");
}